<%-- 
    Document   : actionUpdateSubject
    Created on : Oct 29, 2009, 5:41:37 AM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
             int id = Integer.parseInt(request.getParameter("id"));
             String subjectName = request.getParameter("SubjectName");

        %>
        <jsp:useBean id="ObjectAction" class="DAO.DAOAction" scope="page" />
        <jsp:useBean id="Object" class="DAO.Insert" scope="page" />
        <jsp:setProperty name="Object" property="sub" value="<%=subjectName %>" />
        <%
            if (ObjectAction.updateSubject(id, Object) == true) {
                response.sendRedirect("../displaySubject.jsp");
            } else {
                out.println("Khong thanh cong");
            }
        %>
    </body>
</html>
